package hsintiao.com.xintiaoAPP.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import lombok.Data;

import java.util.Date;

//订单(订单号，订单金额，应用id,userID)
@Data
@ExcelTarget("bill")
public class PayBill {

    static final String WAIT_BUYER_PAY="wait_buyer_pay";//交易已创建，等待买家支付
    static final String TRADE_CLOSED="trade_closed";//交未付款交易超时关闭，或支付完成后全额退款
    static final String TRADE_SUCCESS="trade_success";//交易支付成功，等待买家支付
    static final String TRADE_FINISHED="trade_finished";//	交易结束，不可退款

    private Long id;
    private Long userId;//支付用户的账号id
    @Excel(name = "商品",isImportField = "itemName")
    private String itemName;//订单商品名称
    @Excel(name = "订单金额",isImportField = "total_amount")
    private Long total_amount;//订单金额
    @Excel(name = "实际订单金额",isImportField = "receipt_amount")
    private Long receipt_amount;//商家实际收到金额
    private Integer status=0;//支付状态 0-未付 1-已付 2-已退款
    private String trade_status;//交易状态 TRADE_SUCCESS为支付成功
    @Excel(name = "支付创建时间",isImportField = "gmtCreat",format = "yyyy-MM-dd hh:ss:mm")
    private Date gmtCreat = new Date();//订单创建时间
    @Excel(name = "支付完成时间",isImportField = "gmtPayment",format = "yyyy-MM-dd hh:ss:mm")
    private Date gmtPayment;//支付时间
    private String seller_id;//支付宝商户id
    private String app_id;//支付宝应用id
    @Excel(name = "支付宝订单号",isImportField = "trade_no")
    private String trade_no;//支付宝订单号，支付宝提供
    @Excel(name = "商户订单号",isImportField = "out_trade_no")
    private String out_trade_no;//商品订单号，商户创建
    private String buyer_logon_id;//买家支付宝账户
    private String buyer_id;//买家支付宝账户id

}
